/*
 * TODO
 */
package com.xtrip.base;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import com.xtrip.util.XtripLogger;

/**
 * @project xtrip
 * @author shiming.yao
 * @time 2013-5-23
 */
public class BaseController {

	protected XtripLogger getLogger(Class<?> clazz){
		XtripLogger log = new XtripLogger(clazz.getName());
		return log;
	}
	protected void out(HttpServletResponse response,Object ret){
		response.setHeader("Content-type", "text/html;charset=UTF-8");
		try {
			PrintWriter out = response.getWriter();
			out.print(ret);
			out.flush();
			out.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
